﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Quartz;
using ZHDJ.Core.Log;
using ZHDJ.Data.BLL;
using ZHDJ.WinService.Util;

namespace ZHDJ.WinService.Job
{
    /// <summary>
    /// 积分
    /// </summary>
    public class ScoreJob : JobBase
    {
        public override JobSetInfo JobSetInfo
        {
            get { return new JobSetInfo()
            {
                 JobGroup= "ScoreJobGroup",
                JobName = "ScoreJob",
                //每天1点
                TriggerName = "ScoreJobTrigger",
                Cron = ConfigHelper.ScoreJobIntervalCron
            };
            }
        }

        public override void RunBusiness(IJobExecutionContext context)
        {
            LogHelper.Info("积分统计--开始", "ScoreJob");
            PartyScoreHelper.InitScorcRank();
            LogHelper.Info("积分统计--结束", "ScoreJob");
        }

        public override void OnStop()
        {
            //LogHelper.Info("积分统计--结束 在服务onStop中");
        }
        public override void OnStart()
        {
            //LogHelper.Info("积分统计--开始 在服务OnStart中");
        }
    }
}
